ลำดับชั้นของการให้คำสั่ง: จากคำแนะนำสู่ตรรกะ
การให้คำสั่งได้พัฒนาจากข้อมูลที่มีคำสั่งง่าย ๆ มาเป็นสถาปัตยกรรมการคิดวิเคราะห์ซึ่งช่วยนำทางเส้นทางการประมวลผลภายในของโมเดล
แนวคิดหลัก
- การให้คำสั่งแบบศูนย์ตัวอย่าง:ให้คำอธิบายงานโดยไม่มีตัวอย่างใด ๆ (เช่น "แปลข้อความนี้เป็นภาษาฝรั่งเศส")
- การให้คำสั่งแบบจำนวนน้อย:ใช้ "ตัวอย่างประกอบ" (คู่ข้อมูลนำเข้า-ผลลัพธ์) เพื่อกำหนดช่วงของลาเบลและรูปแบบที่ต้องการ
- ห่วงโซ่ความคิด (CoT):เทคนิคการให้คำสั่งที่กระตุ้นให้โมเดลสร้างขั้นตอนการคิดระหว่างกลาง
- คุณสมบัติที่เกิดขึ้นเอง:การคิดวิเคราะห์ที่ซับซ้อนไม่ได้ถูกเขียนโปรแกรมไว้โดยตรง แต่จะ "ปรากฏ" ในโมเดลที่มีพารามิเตอร์มากกว่า 10 พันล้านตัวโดยทั่วไป
การเปลี่ยนแปลงในกระบวนการคิด
- การปฏิบัติตามคำสั่ง:การจับคู่ข้อมูลนำเข้ากับผลลัพธ์โดยตรง
- การเรียนรู้ในบริบท:เรียนรู้รูปแบบจากตัวอย่างที่ให้มา (แบบจำนวนน้อย)
- การแยกโครงสร้างตรรกะ:การแบ่งปัญหาออกเป็นขั้นตอนตามลำดับ (CoT)
- การควบคุมกระบวนการ:ให้ความสำคัญกับความถูกต้องของขั้นตอนการคิดมากกว่าคำตอบสุดท้าย (เช่น ที่เห็นใน OpenAI o1)
ข้อคิดสำคัญ
ประสิทธิภาพของโมเดลในสถานการณ์แบบจำนวนน้อยมีความไวสูงต่อการกระจายของลาเบลและความเกี่ยวข้องของตัวอย่างประกอบ มากกว่าแค่จำนวนตัวอย่างที่มี
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
Which method relies on providing "demonstrations" to guide the model?
Question 2
True or False: Chain-of-Thought reasoning is a capability found in almost all AI models regardless of size.
Challenge: Optimizing Logic Puzzles
Scenario: Optimize a prompt for a model that is struggling with a logic puzzle.
You are using an LLM to solve the following puzzle: "A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?"
Currently, you are passing the prompt exactly as written above, and the model incorrectly answers "$0.10".
Currently, you are passing the prompt exactly as written above, and the model incorrectly answers "$0.10".
Task 1
Identify if the current prompt is Zero-shot or Few-shot.
Solution:
The current prompt is Zero-shot because it provides the task description without any prior examples or demonstrations of similar solved puzzles.
The current prompt is Zero-shot because it provides the task description without any prior examples or demonstrations of similar solved puzzles.
Task 2
Inject the Zero-shot CoT trigger phrase to improve reasoning accuracy. Rewrite the prompt.
Solution:
"A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost? Let's think step by step:"
"A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost? Let's think step by step:"